package PenTest.meituan.acm0406;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Scanner;

public class acm3 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int m = 3;
        String[] sArray = new String[3];
        for (int i = 0; i < m; i++) {
            sArray[i]=scanner.nextLine();
        }
        int n=Integer.valueOf(sArray[0]);
        Integer[] res = new Integer[n];
        String[] sb = sArray[1].split(" ");
        String[] sc = sArray[2].split(" ");
        acm3 acm3 = new acm3();
        Integer[] ib = acm3.parseS2i(sb);
        Integer[] ic = acm3.parseS2i(sc);
        Arrays.sort(ib);
        Arrays.sort(ic);
        //排序完成后，后面的数减去前面的数，即为当前位置的数字
        for (int i = ib.length - 1; i > 0; i--) {
            ib[i] = ib[i] - ib[i - 1];
        }
        for (int i = ic.length - 1; i > 0; i--) {
            ic[i] = ic[i] - ic[i - 1];
        }
        //找到不相等的值，然后合并，
        ArrayList<Integer> b1 = new ArrayList<>(Arrays.asList(ib));
        ArrayList<Integer> c1 = new ArrayList<>(Arrays.asList(ic));
        int pos = -1;
        Integer val = null;
        for (int i = 0; i < b1.size(); i++) {
            if (!c1.contains(b1.get(i))) {
                val = b1.get(i);
                pos = i;
            }
        }
        if ((pos + 1) == n - 1) {//插入到最后一个位置
            c1.add(n - 1, val);
        } else {
            c1.add(c1.indexOf(b1.get(pos+1)),val);
        }
        for (int i = 0; i < c1.size(); i++) {
            System.out.print(c1.get(i));
            if (i!=c1.size()-1) {
                System.out.print(" ");
            }
        }
        System.out.println("");
    }

    public Integer[] parseS2i(String[] sArray) {
        Integer[] iArray = new Integer[sArray.length];
        for (int i = 0; i < sArray.length; i++) {
            iArray[i] = Integer.valueOf(sArray[i]);
        }
        return iArray;
    }
/*
4
15 9 1
8 18 14*/
}
